<template>
  <Descriptions :column="2" bordered class="dashed">
    <DescriptionsItem label="处罚主体">{{ detail?.targetName }}</DescriptionsItem>
    <DescriptionsItem label="统一社会信用代码">{{ detail?.targetCode }}</DescriptionsItem>
    <DescriptionsItem label="处罚类型">{{ detail?.targetPublishTypeName }}</DescriptionsItem>
    <DescriptionsItem label="处罚原因">{{ detail.punishReason  }}</DescriptionsItem>
    <DescriptionsItem label="处罚内容" :span="2">{{ detail?.punishContent }}</DescriptionsItem>
    <DescriptionsItem label="处罚备注" :span="2">{{ detail?.targetPublishRemark }}</DescriptionsItem>
    <DescriptionsItem label="处罚机关">{{ detail?.punishOrgName }}</DescriptionsItem>
    <DescriptionsItem label="决定日期">{{ parseTime(detail.punishDate )  }}</DescriptionsItem>
    <DescriptionsItem label="公文名称">{{ detail?.punishDocName }}</DescriptionsItem>
    <DescriptionsItem label="公文编号">{{ detail?.punishDocNo }}</DescriptionsItem>
  </Descriptions>

</template>
<script lang="ts" >
import {defineComponent, PropType, toRefs} from "vue";
import { parseTime } from '/@/utils';
import { Descriptions } from "ant-design-vue";

interface BaseModel {
  punishContent?:string;
  punishDate?:number;
  punishDocName?:string;
  punishDocNo?:string;
  punishItemId?:string;
  punishOrgName?:string;
  punishReason?:string;
  targetCode?:string;
  targetId?:string;
  targetName?:string;
  targetPublishRemark?:string;
  targetPublishTypeName?:string;
}

export default defineComponent({
  props: {
    detail:{
      type: Object as PropType<BaseModel>,
      default: {}
    }
  },
  components:{
    Descriptions,DescriptionsItem:Descriptions.Item,
  },
  setup(props) {
    const { detail } = toRefs(props);
    return {
      detail , parseTime
    }
  }
})
</script>

<style lang="less">
.dashed{
  .ant-descriptions-item-content {
    width: 290px !important;
  }
}

</style>

